package cn.ac.iscas.domain.view;

import com.iscas.datasong.lib.common.column.ColumnType;

import java.util.List;

/**
 * 自定义组件中的一个自定义参数
 */

public class ParameterItem{
    private int sn;     //用户自定义属性的位置
    private String id;  //该参数的唯一id，同时也是算法中一个参数名字
    private String label;   //"前台显示名称",
    private String group;           //所属分组，比如featureCols、labelCol等
    private String tips;    // 相关提示，详细描述该参数的物理含义

    private Object	value;  //该参数取值，有默认值的需要初始化此参数
    private ColumnType valuetype;   //参数的取值类型 "Integer/String/Boolean",
    private CtrlType ctrltype;      // 参数需要的展示组件 "checkbox,text,radio,textarea,dropdown",
    private List<Option> options;   //下拉列表选项 [{"label":"XXX","value":"XXX"},{"label":"XXX","value":"XXX"}],
    private String regex;   // 过滤规则，正则表达式

    private boolean enable = true;  //该参数是否可修改，暂时用处不大
    private boolean required;       //该参数是否为必填项，非必填项都应该有默认值
    private boolean delete;         //后台使用，仅对输入列有效，判断经算法处理后该输入列列是否需要删除，方便给前台返回后续组件输入列
    private boolean add;            //后台使用，仅对输出列有效，判断经算法处理后该输出列是否为新加，方便给前台返回后续组件输入列

    private Object advance;         //add 2020.04.20 高级配置信息，前台自己使用，便于场景恢复时保存必要的信息

    public int getSn() {
        return sn;
    }

    public void setSn(int sn) {
        this.sn = sn;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public ColumnType getValuetype() {
        return valuetype;
    }

    public void setValuetype(ColumnType valuetype) {
        this.valuetype = valuetype;
    }

    public CtrlType getCtrltype() {
        return ctrltype;
    }

    public void setCtrltype(CtrlType ctrltype) {
        this.ctrltype = ctrltype;
    }

    public List<Option> getOptions() {
        return options;
    }

    public void setOptions(List<Option> options) {
        this.options = options;
    }

    public String getRegex() {
        return regex;
    }

    public void setRegex(String regex) {
        this.regex = regex;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public boolean isRequired() {
        return required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public boolean isDelete() {
        return delete;
    }

    public void setDelete(boolean delete) {
        this.delete = delete;
    }

    public boolean isAdd() {
        return add;
    }

    public void setAdd(boolean add) {
        this.add = add;
    }

    public Object getAdvance() {
        return advance;
    }

    public void setAdvance(Object advance) {
        this.advance = advance;
    }
}
